from django.db import models
from django import forms

'''
    商品名称 productname

    商品描述 remark

    商品价格 price

    库存数量 inventory_num
'''
class Product(models.Model):
    name = models.CharField(max_length=100)
    remark = models.TextField()
    price = models.FloatField()
    inventory_num = models.IntegerField(default=0)


# 表单校验 不做什么校验了
class ProductForm(forms.ModelForm):
    class Meta:
        model = Product
        fields = ['name', 'remark', 'price','inventory_num']
